package com.example.blog.modules.log.entity;

import com.example.blog.common.base.BaseEntity;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;

@Entity
@Table(name = "operation_logs")
@Getter
@Setter
public class OperationLog extends BaseEntity {
    
    @Column(nullable = false)
    private String username;
    
    @Column(nullable = false)
    private String operation;
    
    @Column(nullable = false)
    private String method;
    
    @Column(length = 1000)
    private String params;
    
    @Column(length = 500)
    private String ip;
    
    @Column(length = 500)
    private String userAgent;
    
    @Column(length = 500)
    private String requestUrl;
    
    private Long executionTime;
    
    @Column(length = 1000)
    private String description;
    
    private boolean success;
    
    @Column(length = 2000)
    private String errorMessage;
} 